
// Copyright (c) 2002 HTHK
package admin.system.func;

import com.ffpc.sql.*;
/**
 * A Class class.
 * <P>
 * @author HTHK
 */
public class Func
  extends DataObject
  implements FuncBean
{
    private String func_id = null;
    private String func_name = null;
    private String parent_id = null;
    private String url = null;
    private String division = null;
    private String sequence = null;
    private String crt_user = null;
    private String crt_date = null;
    private String upd_user = null;
    private String upd_date = null;

    private Column ColFunc_id = null;
    private Column ColFunc_name = null;
    private Column ColParent_id = null;
    private Column ColUrl = null;
    private Column ColDivision = null;
    private Column ColSequence = null;
    private Column ColCrt_user = null;
    private Column ColCrt_date = null;
    private Column ColUpd_user = null;
    private Column ColUpd_date = null;
    /**
     * Constructor
     */
    public Func()
    {
        ColFunc_id = new Column(0,"func_id",Column.Types.string,null,10,false);
        ColFunc_name = new Column(1,"func_name",Column.Types.string,null,50,false);
        ColParent_id = new Column(2,"parent_id",Column.Types.string,null,10,true);
        ColUrl = new Column(3,"url",Column.Types.string,null,100,true);
        ColDivision = new Column(4,"division",Column.Types.string,null,100,true);
        ColSequence = new Column(5,"sequence",Column.Types.string,null,10,true);
        ColCrt_user = new Column(6,"crt_user",Column.Types.string,null,10,true);
        ColCrt_date = new Column(7,"crt_date",Column.Types.time,null,10,true);
        ColUpd_user = new Column(8,"upd_user",Column.Types.string,null,10,true);
        ColUpd_date = new Column(9,"upd_date",Column.Types.time,null,10,true);
    }

    // functions belongs to FuncBean interface

    @Override
	public void setFunc_id(String func_id)
    {
        this.func_id = this.setAttribute(ColFunc_id,func_id);
    }

    @Override
	public String getFunc_id()
    {
        return this.func_id==null?"":this.func_id;
    }

    @Override
	public void setFunc_name(String func_name)
    {
        this.func_name = this.setAttribute(ColFunc_name,func_name);
    }

    @Override
	public String getFunc_name()
    {
        return this.func_name==null?"":this.func_name;
    }

    @Override
	public void setParent_id(String parent_id)
    {
        this.parent_id = this.setAttribute(ColParent_id,parent_id);
    }

    @Override
	public String getParent_id()
    {
        return this.parent_id==null?"":this.parent_id;
    }

    @Override
	public void setUrl(String url)
    {
        this.url = this.setAttribute(ColUrl,url);
    }

    @Override
	public String getUrl()
    {
        return this.url==null?"":this.url;
    }

    @Override
	public void setDivision(String division)
    {
        this.division = this.setAttribute(ColDivision,division);
    }

    @Override
	public String getDivision()
    {
        return this.division==null?"":this.division;
    }

    @Override
	public void setSequence(String sequence)
    {
        this.sequence = this.setAttribute(ColSequence,sequence);
    }

    @Override
	public String getSequence()
    {
        return this.sequence==null?"":this.sequence;
    }

    @Override
	public void setCrt_user(String crt_user)
    {
        this.crt_user = this.setAttribute(ColCrt_user,crt_user);
    }

    @Override
	public String getCrt_user()
    {
        return this.crt_user==null?"":this.crt_user;
    }

    @Override
	public void setCrt_date(String crt_date)
    {
        this.crt_date = this.setAttribute(ColCrt_date,crt_date);
    }

    @Override
	public String getCrt_date()
    {
        return this.crt_date==null?"":this.crt_date;
    }

    @Override
	public void setUpd_user(String upd_user)
    {
        this.upd_user = this.setAttribute(ColUpd_user,upd_user);
    }

    @Override
	public String getUpd_user()
    {
        return this.upd_user==null?"":this.upd_user;
    }

    @Override
	public void setUpd_date(String upd_date)
    {
        this.upd_date = this.setAttribute(ColUpd_date,upd_date);
    }

    @Override
	public String getUpd_date()
    {
        return this.upd_date==null?"":this.upd_date;
    }
    // belongs to row interface
    @Override
	public Column[] createColumns()
    {
        Column[] cols = new Column[10];
        cols[0] = ColFunc_id.clone(null);
        cols[1] = ColFunc_name.clone(null);
        cols[2] = ColParent_id.clone(null);
        cols[3] = ColUrl.clone(null);
        cols[4] = ColDivision.clone(null);
        cols[5] = ColSequence.clone(null);
        cols[6] = ColCrt_user.clone(null);
        cols[7] = ColCrt_date.clone(null);
        cols[8] = ColUpd_user.clone(null);
        cols[9] = ColUpd_date.clone(null);
        return cols;
    }

    // super's abstract methods

    @Override
	public String getTableName()
    {
        return "jis.jis_s_func";
    }

    @Override
	protected String[] getKeyColumnNames()
    {
        String[] list = {"func_id"};
        return list;
    }

    @Override
	protected String[] getUpdatableColumnNames()
    {
        String[] list = {"func_name","parent_id","url","division","sequence","crt_user","crt_date","upd_user","upd_date"};
        return list;
    }

    @Override
	protected void retrieveColumnValues()
    {
        this.func_id = this.retrieveColumnValue("func_id");
        this.func_name = this.retrieveColumnValue("func_name");
        this.parent_id = this.retrieveColumnValue("parent_id");
        this.url = this.retrieveColumnValue("url");
        this.division = this.retrieveColumnValue("division");
        this.sequence = this.retrieveColumnValue("sequence");
        this.crt_user = this.retrieveColumnValue("crt_user");
        this.crt_date = this.retrieveColumnValue("crt_date");
        this.upd_user = this.retrieveColumnValue("upd_user");
        this.upd_date = this.retrieveColumnValue("upd_date");
    }
}

